<?php
require_once __DIR__.'/BOFactory.class.php';
	
	class ProductBORepository
	{   
		function getProductBOs()
		{	
			$productBOs=array();
			//$products = R::findAll( 'product' );
			$products = R::find( 'product', ' typecode in (2,4) ');
			foreach($products as $k => $product)
			{
				array_push($productBOs,BOFactory::getProductBO($product->id));
			}			
			return $productBOs;
		}
		
		function getProductBO($id)
		{
			return BOFactory::getProductBO($id);
		}
		
		
	}